package com.liu.bean;

import com.liu.common.valid.ISave;
import com.liu.common.valid.IUpdate;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
@ApiModel("企业")
public class Enterprise {

    @ApiModelProperty(value = "企业id，修改时不为空")
    @NotNull(message = "企业id不能为空",groups = {IUpdate.class})
    @Min(value = 1,message = "请填写正确的id",groups = {IUpdate.class})
    Integer id;
    @ApiModelProperty(hidden = true)
    String code;
    @ApiModelProperty(value = "企业名称",required = true)
    @NotBlank(message = "企业名称不能为空",groups = {ISave.class})
    String name;
    String user;
    String mobile;
    String categoryCode;
    String categoryName;
    String address;

}
